package com.neutech.solar.entity;

import com.neutech.solar.util.ImageUtil;

import java.awt.*;
import java.util.Random;

public class Shower extends Start {


    public Shower(String imageKey,int x, int y) {
        this.img = ImageUtil.maps.get(imageKey);
        this.x = x;
        this.y = y;
    }


    @Override
    public void draw(Graphics g) {
        g.drawImage(img, x,y , null);
        move();
    }

    @Override
    public void move() {
        Random random = new Random();

        this.x-= random.nextInt(10);
        this.y+= random.nextInt(10);
    }
}
